home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Public Const NED_32IMAGE_E_NOERROR As Integer = 0
- Public Const NED_32IMAGE_E_OUTOFMEMORY As Integer = 1
- Public Const NED_32IMAGE_E_NOIMAGE As Integer = 2
- Public Const NED_32IMAGE_E_BADIMAGE As Integer = 3
- Public Const NED_32IMAGE_E_BADIMAGETYPE As Integer = 4
- Public Const NED_32IMAGE_E_REDUCTIONFAILED As Integer = 5
- Public Const NED_32IMAGE_E_FILENOTFOUND As Integer = 6
- Public Const NED_32IMAGE_E_OUTOFVAS As Integer = 7
- Public Const NED_32IMAGE_E_FILEMAPPING As Integer = 8
- Function HasError(nError As Integer) As Boolean
- Dim bRet As Boolean
- bRet = False
-
- Select Case nError
- Case Is = NED_32IMAGE_E_NOERROR
- 'No Error
-
- Case Is = NED_32IMAGE_E_OUTOFMEMORY
- MsgBox ("There is not enough memory to load this image!")
- Case Is = NED_32IMAGE_E_NOIMAGE
- MsgBox ("No image is loaded!")
- bRet = True
- Case Is = NED_32IMAGE_E_BADIMAGE
- MsgBox ("The image file is not correct!")
- bRet = True
- Case Is = NED_32IMAGE_E_BADIMAGETYPE
- MsgBox ("The image file type is not supported!")
- bRet = True
- Case Is = NED_32IMAGE_E_REDUCTIONFAILED
- MsgBox ("The color reduction step failed!")
- bRet = True
- Case Is = NED_32IMAGE_E_FILENOTFOUND
- MsgBox ("The file specification was not found!")
- bRet = True
- Case Is = NED_32IMAGE_E_OUTOFVAS
- MsgBox ("There is not enough Virtual Address Space to load this file!")
- bRet = True
- Case Is = NED_32IMAGE_E_FILEMAPPING
- MsgBox ("The Image File could note be mapped into memory!")
- bRet = True
- Case Else
- MsgBox ("The NED Image OCX had an unspecified error!")
- bRet = True
- End Select
-
- HasError = bRet
- End Function
-
-
-